<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/24
 * Time: 15:18
 */
namespace Home\Model;
use Think\Model;
class OrderModel extends Model{
    private $_db = '';

    public function __construct() {
        $this->_db = M('order');
    }
    public function getGoodsByid($id){
        $res=$this->_db->where("id='$id'")->getField('goods_id');
        return $res;
    }
    public function selectTime($start,$end){
        $res=$this->_db->where("departure_time between '%s' and '%s' ",array($start,$end))->select();
        return $res;
    }
}